﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SnakeGame
{
    class RandomPoint : Point
    {
        int _margin;
        Random _random;
        Point _rPoint;

        public RandomPoint(Point point, int margin)
        {
            _margin = margin;
            _random = new Random();
            _rPoint = new Point(_random.Next(this._margin, point.X), _random.Next(this._margin, point.Y));
        }

        public Point RandPoint
        {
            get { return _rPoint; }
        }
    }
}
